package day06.work02;

import java.util.ArrayList;
import java.util.Collection;

public class Test {
    public static void main(String[] args) {
        Collection<String> collection=new ArrayList<>();
        collection.add("hello");
        collection.add("hello");
        collection.add("the");
        collection.add("world");
        collection.add("I hit you");
        collection.add("!");
        collection.add("!");

        Collection<String> unique_coll=new ArrayList<>();
        for(String string:collection){
            if(unique_coll.contains(string)){}
            else {unique_coll.add(string);}
        }
        for(Object object:unique_coll.toArray()){
            System.out.println(object);
        }
    }
}
